package com.book.category.domain;

import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.book.common.annotation.Excel;
import com.book.common.core.domain.BaseEntity;

/**
 * 图书分类对象 book_category
 * 
 * @author ruoyi
 * @date 2025-05-29
 */
public class BookCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类ID */
    private Long id;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 分类描述 */
    @Excel(name = "分类描述")
    private String description;

    /** 父分类ID（用于多级分类） */
    @Excel(name = "父分类ID", readConverterExp = "用=于多级分类")
    private Long parentId;

    /** 图书信息 */
    private List<Books> bookList;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCategoryName(String categoryName) 
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName() 
    {
        return categoryName;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setParentId(Long parentId) 
    {
        this.parentId = parentId;
    }

    public Long getParentId() 
    {
        return parentId;
    }

    public List<Books> getBookList()
    {
        return bookList;
    }

    public void setBookList(List<Books> bookList)
    {
        this.bookList = bookList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("categoryName", getCategoryName())
            .append("description", getDescription())
            .append("parentId", getParentId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("bookList", getBookList())
            .toString();
    }
}
